/**
 * @file 白板管理接口
 */
import { get, post } from '@/api/request.ts';

const whiteBoard = {
  // 新建白板
  async createWhiteBoard(params: any) {
    return await post('/client/bus/board/create', params);
  },
  // 获取白板详细信息
  async getBoardDetails(params: any) {
    return await get('/client/bus/board/get-board-detail', params);
  },
  // 白板重命名
  async renameBoard(params: any) {
    return await post('/client/bus/board/update', params);
  },
  // 删除白板（进入回收站）
  async removeBoard(params: any) {
    return await post('/client/bus/board/delete', params);
  },
  // 恢复白板
  async recoverBoard(params: any) {
    return await post('/client/bus/board/restore', params);
  },
  // 彻底删除白板
  async cleanOutBoard(params: any) {
    return await post('/client/bus/board/completely-delete', params);
  },
  // 修改白板成员的角色
  async changeBoardMemberRole(params: any) {
    return await post('/client/bus/board/change-member-role', params);
  },
  // 获取白板邀请链接
  async getBoardInviteUrl(params: any) {
    return await get('/client/bus/board/get-invite-url', params);
  },
  // 重置白板链接
  async resetBoardInviteUrl(params: any) {
    return await post('/client/bus/board/clear-invite-url', params);
  },
  // 查看白板邀请详情
  async getBoardInviteDetails(params: any) {
    return await get('/client/bus/board/get-invite-code-info', params);
  },
  // 使用邀请码进入白板协作
  async joinInBoardByInviteCode(params: any) {
    return await get('/client/bus/board/join-by-invite-code', params);
  },
};

export default whiteBoard;
